package xyz.zyl2020.juc.thread;

import java.util.concurrent.TimeUnit;

/**
 * @author ZhuYinglong
 * @date 2020/10/9 0009
 */
public class ThreadDemo9 {

    public static void main(String[] args) throws InterruptedException {
        Thread myThread = new Thread(() -> {
            System.out.println("run方法结束");
        }, "myThread");
        myThread.start();
        TimeUnit.SECONDS.sleep(1);
        System.out.println(myThread.getState());
    }
}
